#ifndef WQMOVEITEM_H
#define WQMOVEITEM_H

#include <QLinearGradient>
#include <QGraphicsObject>

class wqBtnItem;
class wqToolItem;

class wqMoveItem : public QGraphicsObject
{
    Q_OBJECT

public:
    wqMoveItem(const QString& itemName, QGraphicsItem* parent = NULL);

signals:
    void sig_posChanged();

protected slots:
	void slot_changeRect();

protected:
    virtual QRectF boundingRect() const;
    virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* item, QWidget* wid);
    virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);

    virtual void mousePressEvent ( QGraphicsSceneMouseEvent * ev );
    virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * ev);
    virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * ev);

	virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent * event );
	virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event );

	virtual void contextMenuEvent( QGraphicsSceneContextMenuEvent *event );

private:
    QLinearGradient GetGreen_linearGradient(int OFFSET_Y = 0);
    QLinearGradient GetYellow_linearGradient(int OFFSET_Y = 0);

private:
	QRectF mBoundingRect;

	wqBtnItem* btn_top;
	wqBtnItem* btn_left;
	wqBtnItem* btn_right;

	wqToolItem* tool1;
	wqToolItem* tool2;
};

#endif // WQMOVEITEM_H
